package com.chinaway.mobile.http.util;

import java.util.List;
import java.util.Map;

import com.chinaway.mobile.model.RespMobileBean;
/**
 * @author lenovo
 *
 */
public class ApiResult {

	private int code;//1表示操作成功，2表示失败
	private String message;//封装失败的信息，成功返回null
	@SuppressWarnings("rawtypes")
	private Map params;//参数
	private List<RespMobileBean> data;//数据
	private String total;
	private String page;
	
	private String pagesize;
	public ApiResult() {
		code = 0;
	}
	public String getTotal() {
		return total;
	}
	public void setTotal(String total) {
		this.total = total;
	}
	public String getPage() {
		return page;
	}
	public void setPage(String page) {
		this.page = page;
	}
	public String getPagesize() {
		return pagesize;
	}
	public void setPagesize(String pagesize) {
		this.pagesize = pagesize;
	}
	public ApiResult(int code, String msg) {
		this.code = code;
		this.message = msg;
	}

	
	public List<RespMobileBean> getData() {
		return data;
	}
	public void setData(List<RespMobileBean> data) {
		this.data = data;
	}
	public int getCode() {
		return code;
	}
	public String getMessage() {
		return message;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	@SuppressWarnings("rawtypes")
	public Map getParams() {
		return params;
	}
	public void setParams(@SuppressWarnings("rawtypes") Map params) {
		this.params = params;
	}
	
	
	@Override
	public String toString() {
		return "ApiResult [code=" + code + ", message=" + message + ", params="
				+ params + ", data=" + data + ", total=" + total + ", page="
				+ page + ", pagesize=" + pagesize + "]";
	}
}
